﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RayTracing
{

    class ParaTestScene : Scene
    {

        // Camera variables
        P3 cameraPosition;
        public float distance;

        public Color backGroundColor;

        // Lights in Scene        
        public AmbientLight ambientLight;
        public DirectionalLight directionalLight;

        //Geometries
        Geometry para1;
        Geometry spara1;
        //Geometry sphere;
        Geometry sphere2;

        //Textures
        Texture uv;
        Texture green;
        Texture red;

        //Skins
        Skin nonreflective;
        Skin mirror;

        // Scene Objecets
        SceneObject greenSphere;
        SceneObject sphereObj;


        public override string sceneName()
        {
            return "Para Test";
        }

        public override void createScene(out List<SceneObject> objects, out List<Light> lights, float time, float slider1, float slider2, float slider3, float slider4, float slider5)
        {
            // every scene needs these two lines
            objects = new List<SceneObject>();
            lights = new List<Light>();

            // Camera variables
            cameraPosition = new P3(0, -5, 0);
            distance = -5;
            backGroundColor = Color.BLACK;

            // Lights in Scene
            ambientLight = new AmbientLight(new Color(.4f, .4f, .4f));
            directionalLight = new DirectionalLight(new P3(time, slider3, slider2), new Color(1.8f, 1.8f, 1.8f));
            //add Lights to the lights list
            lights.Add(ambientLight);
            lights.Add(directionalLight);

            //geometries
            para1 = new Parabaloid(1, 1,1, 1, time, -1, 1, 2, 1, -1f);
            spara1 = new ShiftedObject(para1, new P3(0, 4, 0),new P3(1,1,1.5f));

            //new Sphere(new P3(0, 9, 0), 1);
            sphere2 = new Sphere(new P3(-2, 10, -2), 1);
            //textures
            uv = new ImageTexture(Properties.Resources.uvImage);
            green = new SolidTexture(Color.GREEN);
            red = new SolidTexture(Color.RED);
            //skins
            nonreflective = new NonReflective();
            mirror = new Mirror();
            // Scene Objects
            greenSphere = new SceneObject(spara1, red, nonreflective);
            sphereObj = new SceneObject(sphere2, uv, nonreflective);

            //add objects to theScene
            objects.Add(greenSphere);
            objects.Add(sphereObj);


        }

        public override String[] SliderLabels()
        {
            String[] sliderLabels = { "Dlight X", "Dlight Z", "Dlight Y", "Not Used", "Not Used" };
            return sliderLabels;
        }

        public override AnimationParamaters getAnimationParamaters()
        {
            return new AnimationParamaters(21, .05f);
        }
    }
}
